package user

import (
	"fmt"
	"time"
)

type UserPhotoEntity struct {
	ID        int64     `json:"id"`
	UserID    int64     `json:"user_id"`
	FileName  string    `json:"file_name"`
	PhotoSize int64     `json:"photo_size"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

func (u *UserPhotoEntity) OssPath(region, bucketName string) string {
	return fmt.Sprintf("https://%s.oss-%s.aliyuncs.com/%s", bucketName, region, u.FileName)
}
